package com.example.houseman.controller;


import com.example.houseman.entity.TMBank;
import com.example.houseman.service.ITMBankService;
import com.org.vo.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 银行代码表 前端控制器
 * </p>
 *
 * @author 龚梦
 * @since 2021 -04-14
 */
@RestController
@RequestMapping("/hou/tmbank")
public class TMBankController {

    /**
     * The Itm bank service.
     */
    @Autowired
    ITMBankService itmBankService;

    /**
     * 查询所有的银行
     *
     * @return result entity
     */
    @RequestMapping("/banks")
    public ResultEntity banks() {
        List<TMBank> list = itmBankService.list();
        return ResultEntity.ok("200", "查询所有银行", list);
    }
}
